package Month07.day24;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DemoException {
    public static void main(String[] args) throws ParseException {
        String str="1997-12-23";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
        try {
        Date date=simpleDateFormat.parse(str);
        System.out.println(date);
        }catch (ParseException e){
            System.out.println("代码有解析异常");
        }
        System.out.println("gg");
    }
}
